from core.room import Room
from core.basehandler import BaseHandler
from core.support import get_game

class VictoryRoom(Room):
    
    def __init__(self, room_id):
        Room.__init__(self, room_id)    # do basic initialization for every room
        player = get_game().get_player()
        if int(player.cookiepoints) >= 3:
            self.music = 1
    # return description of room.
    def get_description(self):
        player = get_game().get_player()
        if int(player.cookiepoints) >= 3:
          
            return '''Well done!
            Just by looking at you, Velma can tell you are whiz-bang.  
            You got yourself a date!'''            
        else:
            return '''After a quick conversation, Velma decides you are not her type.
            You realize girls are hard...and instead focus on something soft.'''
            
      
    # return image of room
    def get_image(self):
        player = get_game().get_player()
        if int(player.cookiepoints) >=3:
            return 'happyendingbilly.jpg'
        else:
            return 'badendingbilly.jpg'
        
    # define the music path for room
    def get_musicpath(self):
        return 'images/nerd_win.mp3'

class VictoryRoomHandler(BaseHandler):
    
    # override default template to omit the inventory and actions
    def get_template(self):
        return 'victory.html'
    
    # return class to use to create a new instance of this room
    def get_room_class(self):
        return VictoryRoom

# define actions for this room
